import { Request } from './request/index'
export type { IPage, IApiData } from './request/type'

const baseURL = window.SITE_CONFIG.apiURL ? window.SITE_CONFIG.apiURL : import.meta.env.VITE_BASE_URL
const timeout = import.meta.env.VITE_TIMEOUT

const request = new Request({
  baseURL,
  timeout
})

export const testRequest = new Request({
  baseURL: 'http://localhost:8080/',
  timeout: 30000
})

export default request
